﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gallio.Framework;
using MbUnit.Framework;
using MbUnit.Framework.ContractVerifiers;
using MyBuild.Messages;

namespace MyBuild.Tests.Messages
{
    [TestFixture]
    public class TimeOutNotificationFixture
    {
        [Test]
        public void TimeOutNotificationCtor_WithNullDetails_ThrowsNullArgException()
        {
            try
            {
                new TimeOutNotification(null);
            }
            catch (ArgumentNullException)
            {
                return;
            }
            Assert.Fail("ArgumentNullException expected");
        }
        [Test]
        public void TimeOutNotificationCtor_WithDetails_ShouldBeAssignedAsDetails()
        {
            //arrange
            var details = new ContinuousBuildServiceDetails("name", "filter", "path", "exePath");
            //Act
            var notification = new TimeOutNotification(details);
            //Assert
            Assert.AreEqual(details, notification.BuildDetails);
        }
    }
}
